using System;

namespace SevenZSharp.CommandLine
{
   /// <summary>
   /// 
   /// </summary>
   public class ArchiveTypes
   {
      /// <summary>
      /// Gets the type of the archive (-t parameter).
      /// Taken from 7zip\UI\Common\ArchiverInfo.cpp::ReadArchiverInfoList
      /// </summary>
      /// <param name="format">The format.</param>
      /// <returns></returns>
      public static string GetArchiveType(CompressionFormat format)
      {
         switch (format)
         {
            case CompressionFormat.SevenZ:
               return "7z";
            case CompressionFormat.Bzip2:
               return "BZip2";
            case CompressionFormat.Gzip:
               return "GZip";
            case CompressionFormat.Split:
               return "Split";
            case CompressionFormat.Tar:
               return "Tar";
            case CompressionFormat.Zip:
               return "Zip";
            case CompressionFormat.Cpio:
               return "Cpio";
            case CompressionFormat.Rpm:
               return "Rpm";
            case CompressionFormat.Arj:
               return "Arj";
            case CompressionFormat.Z:
               return "Z";
            default:
               throw new NotImplementedException("Unknown -t type for Compression Format " + format);
         }
      }
   }
}